package com.qianfeng.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 学科表
 */
public class Subject {

  private Integer subjectId;
  private String subjectName;
  private Integer subjectLife;
  @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
  @DateTimeFormat(pattern = "yyyy-MM-dd")
  private Date createTime;
  private Integer subjectTypeId;
  private SubjectType subjectType;

  public Subject() {
  }

  public Subject(Integer subjectId) {
    this.subjectId = subjectId;
  }

  public Subject(Integer subjectId, String subjectName, Integer subjectLife, Date createTime, Integer subjectTypeId, SubjectType subjectType) {
    this.subjectId = subjectId;
    this.subjectName = subjectName;
    this.subjectLife = subjectLife;
    this.createTime = createTime;
    this.subjectTypeId = subjectTypeId;
    this.subjectType = subjectType;
  }

  @Override
  public String toString() {
    return "Subject{" +
            "subjectId=" + subjectId +
            ", subjectName='" + subjectName + '\'' +
            ", subjectLife=" + subjectLife +
            ", createTime=" + createTime +
            ", subjectTypeId=" + subjectTypeId +
            ", subjectType=" + subjectType +
            '}';
  }

  public Integer getSubjectId() {
    return subjectId;
  }

  public void setSubjectId(Integer subjectId) {
    this.subjectId = subjectId;
  }

  public String getSubjectName() {
    return subjectName;
  }

  public void setSubjectName(String subjectName) {
    this.subjectName = subjectName;
  }

  public Integer getSubjectLife() {
    return subjectLife;
  }

  public void setSubjectLife(Integer subjectLife) {
    this.subjectLife = subjectLife;
  }

  public Date getCreateTime() {
    return createTime;
  }

  public void setCreateTime(Date createTime) {
    this.createTime = createTime;
  }

  public Integer getSubjectTypeId() {
    return subjectTypeId;
  }

  public void setSubjectTypeId(Integer subjectTypeId) {
    this.subjectTypeId = subjectTypeId;
  }

  public SubjectType getSubjectType() {
    return subjectType;
  }

  public void setSubjectType(SubjectType subjectType) {
    this.subjectType = subjectType;
  }
}
